package com.neusoft.thread1safe;

public class Count 
{
	private int num;
	
	public void countGlobalNum()
	{
		for(int i=1;i<11;i++)
		{
			num+=i;
		}
		System.out.println(Thread.currentThread().getName()+":"+num);
	}
	
	public void countMethodNum()
	{
		int num=0;
		for(int i=1;i<11;i++)
		{
			num+=i;
		}
		System.out.println(Thread.currentThread().getName()+":"+num);
	}
}
